package dhbw.GUI.Panels;

import java.awt.BorderLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import Main.MyController;

import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;

import dhbw.Data.Language;
import dhbw.Data.Settings;

public class ContentPanelLoginData extends JPanel{

	protected JTextField tf_password, tf_login;
	private MyController myc;
	
	public ContentPanelLoginData(MyController myc)
	{
		this.myc = myc;
		build();
	}
	
	public void build()
	{
		this.setBackground(Settings.BG_COLOR);
		CellConstraints cc = new CellConstraints();
		String cols = "16dlu,40dlu,6dlu,80dlu,16dlu";
		String rows = "6dlu,pref,12dlu,pref,6dlu";
		FormLayout grid = new FormLayout(cols, rows);
		this.setLayout(grid);
		tf_login = new JTextField();
		tf_password = new JTextField();
		this.add(new JLabel(Language.USER[myc.getLanguage()]),cc.xy(2, 2));
		this.add(tf_login,cc.xy(4, 2));
		this.add(new JLabel(Language.PASSWORD[myc.getLanguage()]),cc.xy(2, 4));
		this.add(tf_password,cc.xy(4, 4));
	}
}
